package com.tao.controller;

import com.alibaba.fastjson.JSONObject;
import com.tao.pojo.StorageExample;
import com.tao.service.storage.IstorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/storage")
public class StorageController {
    @Autowired
    IstorageService storageService;
    @RequestMapping(value = "/show.do",produces = "application/json;charset=utf-8")
    @ResponseBody
    public String show(){
        StorageExample storageExample=new StorageExample();
        storageExample.createCriteria().andIsDelEqualTo(0);
        return JSONObject.toJSONString(storageService.getStorage(storageExample));
    }
}
